package com.ruoyi.busy.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.busy.mapper.BusySourceMapper;
import com.ruoyi.busy.domain.BusySource;
import com.ruoyi.busy.service.IBusySourceService;

/**
 * 用户参数源Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-22
 */
@Service
public class BusySourceServiceImpl implements IBusySourceService 
{
    @Autowired
    private BusySourceMapper busySourceMapper;

    /**
     * 查询用户参数源
     * 
     * @param id 用户参数源主键
     * @return 用户参数源
     */
    @Override
    public BusySource selectBusySourceById(Long id)
    {
        return busySourceMapper.selectBusySourceById(id);
    }

    /**
     * 查询用户参数源列表
     * 
     * @param busySource 用户参数源
     * @return 用户参数源
     */
    @Override
    public List<BusySource> selectBusySourceList(BusySource busySource)
    {
        return busySourceMapper.selectBusySourceList(busySource);
    }

    /**
     * 新增用户参数源
     * 
     * @param busySource 用户参数源
     * @return 结果
     */
    @Override
    public int insertBusySource(BusySource busySource)
    {
        busySource.setCreateTime(DateUtils.getNowDate());
        return busySourceMapper.insertBusySource(busySource);
    }

    /**
     * 修改用户参数源
     * 
     * @param busySource 用户参数源
     * @return 结果
     */
    @Override
    public int updateBusySource(BusySource busySource)
    {
        busySource.setUpdateTime(DateUtils.getNowDate());
        return busySourceMapper.updateBusySource(busySource);
    }

    /**
     * 批量删除用户参数源
     * 
     * @param ids 需要删除的用户参数源主键
     * @return 结果
     */
    @Override
    public int deleteBusySourceByIds(Long[] ids)
    {
        return busySourceMapper.deleteBusySourceByIds(ids);
    }

    /**
     * 删除用户参数源信息
     * 
     * @param id 用户参数源主键
     * @return 结果
     */
    @Override
    public int deleteBusySourceById(Long id)
    {
        return busySourceMapper.deleteBusySourceById(id);
    }
}
